# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-nmap
_pkgname=nmap
pkgver=0.7.1
pkgrel=2
pkgdesc="Python3 class to use nmap and access scan results"
options="!check" # tests prompt for doas password (wtf)
url="http://xael.org/pages/python-nmap-en.html"
arch="noarch"
license="GPL-3.0-or-later"
depends="nmap"
makedepends="py3-setuptools"
checkdepends="py3-nose"
subpackages="$pkgname-pyc"
source="http://xael.org/pages/python-$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/python-$_pkgname-$pkgver

replaces="py-nmap" # Backwards compatibility
provides="py-nmap=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	nosetests
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
3a1d3b7120527d56148ddf3589bf8c4b749bb549e93c65a973d3edacb492656d0060d82606f88c5d1342dabdce00b8957bf09e01a5ce42f3a670ff3778d9e0ea  python-nmap-0.7.1.tar.gz
"
